<template>
  <div class="users">
    <!-- 标签页 -->
  <el-tabs v-model="activeName" @tab-click="handleClick">
    <el-tab-pane label="用户管理" name="first">
            <!-- list -->
        <el-table :data="tableData" style="width: 100%" >
          <el-table-column fixed prop="unid" label="unid" width="220">
          </el-table-column>
          <el-table-column prop="username" label="用户名" width="300"> 
          </el-table-column>
          <el-table-column prop="nickname" label="昵称" width="220">
          </el-table-column>
          <el-table-column prop="vipLevel" label="Vip等级" width="220"> 
          </el-table-column>
          <el-table-column label="操作" width="300">
            <template >
              <el-button type="primary"  @click="edit(row)">编辑</el-button>
              <el-button type="danger"   @click="delStu(row)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
        <!-- end -->
  </el-tab-pane>

    <el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
  </el-tabs>
    
  </div>
</template>


<script>
  import * as api  from "@/api/usermanage"
  export default {
    meta:{
       title: 'yhgl',
       name:"用户管理",
       icon:"iconfont icon-yonghu"
    },
    methods: {
      deleteRow(index, rows) {
        rows.splice(index, 1);
      },
      handleClick(tab, event) {
        // console.log(tab, event);
      }
    },
    data() {
      return {
        activeName: 'first',
      
        tableData: []
      }
    },
    created(){
      api.GetUsermanage()
      .then(res=>{
        console.log(res.data.data)
        this.tableData=res.data.data

      })
    }
  }
</script>

<style scoped lang="less">
/deep/.el-tabs__nav-scroll{
  line-height:40px;
}
/deep/tr{
  line-height:40px;
}
</style>